class PSAnimNodeBlendByPosture extends UDKAnimBlendBase;

event TickAnim(float DeltaSeconds)
{
	local PSPawn P;

	if (SkelComponent.Owner != none)
		P = PSPawn(SkelComponent.Owner);
	else
		P = none;

	if (P != none)
	{
		switch(P.CurrentPosture)
		{
		case(P.EPosture.POSTURE_Walking):
			if(ActiveChildIndex != 0)
			{
				SetActiveChild(0, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Running):
			if(ActiveChildIndex != 1)
			{
				SetActiveChild(1, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Crouching):
			if(ActiveChildIndex != 2)
			{
				SetActiveChild(2, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Covered_Stand):
			if(ActiveChildIndex != 3)
			{
				SetActiveChild(3, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Covered_Crouch):
			if(ActiveChildIndex != 4)
			{
				SetActiveChild(4, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Carrying):
			if(ActiveChildIndex != 5)
			{
				SetActiveChild(5, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Checking):
			if(ActiveChildIndex != 6)
			{
				SetActiveChild(6, 0.1);
			}
			break;
		case(P.EPosture.POSTURE_Hacking):
			if(ActiveChildIndex != 7)
			{
				SetActiveChild(7, 0.1);
			}
			break;
		}
	}
}


DefaultProperties
{
	Children(0)=(Name="Walking")
	Children(1)=(Name="Running")
	Children(2)=(Name="Crouching")
	Children(3)=(Name="Cover_stand")
	Children(4)=(Name="Cover_crouch")
	Children(5)=(Name="Carrying")
	Children(6)=(Name="Checking")
	Children(7)=(Name="Hacking")

	bTickAnimInScript=true
}
